import request from '@renderer/server'

// 获得轮播图列表
export const getBannerApi = () => {
  return request.get({
    url: '/banner'
  })
}

// 获得热门推荐
export const getPersonalizedApi = (limit = 10) => {
  return request.get({
    url: `/personalized?limit=${limit}`
  })
}

// 获得最新音乐
export const getNewSongApi = (limit = 10) => {
  return request.get({
    url: `/personalized/newsong?limit=${limit}`
  })
}

// 获得歌单详情
export const getPlaylistDetailApi = (id: number) => {
  return request.get({
    url: `/playlist/detail?id=${id}`
  })
}

// 获得排行榜数据
export const getTopListApi = (id) => {
  return request.get({
    url: `/playlist/detail?id=${id}`
  })
}

// 获得对应歌曲的歌词
export const getLyricApi = (id: number) => {
  return request.get({
    url: `/lyric?id=${id}`
  })
}
